package com.chb.docter.feigns;

import com.chb.docter.factory.DeptFeignFallbackFactory;
import com.hos.entity.sys.Dept;
import com.hos.entity.sys.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

import java.util.List;

/**
 * @author: 陈海彬
 * @date: Created in 2023/12/12 18:44
 * @description: 科室远程调用接口
 * @modified By:
 * @version: 1.0
 */
@FeignClient(name = "hos-system", fallbackFactory = DeptFeignFallbackFactory.class)
public interface DeptFeign {

    /**
     * 根据科室id查询科室信息
     *
     * @param deptId 科室id
     */
    @GetMapping("/system/dept/selectDeptByDeptId/{deptId}")
    Dept selectDeptByDeptId(@PathVariable Long deptId);


    /**
     * 根据科室id使挂号编号自增
     *
     * @param deptId 科室id
     * @return 影响的行数
     */
    @PutMapping("/system/dept/updateDeptByDeptId/{deptId}")
    int updateDeptByDeptId(@PathVariable Long deptId);



}
